package com.tuanzi.loan.business.service.settlement;

import com.tuanzi.loan.business.entity.settlement.CompanyInfo;
import com.tuanzi.loan.business.entity.settlement.ProductLinkInfo;
import com.tuanzi.loan.business.entity.settlement.QualificationInfo;
import com.tuanzi.loan.core.service.BaseAuditService;
import com.tuanzi.loan.core.vo.PageSearcher;
import com.tuanzi.loan.vo.request.settlement.CompanyInfoSearchRequest;
import com.tuanzi.loan.vo.response.settlement.CompanyInfoSearchResponse;
import com.tuanzi.loan.vo.view.settlement.CompanyInfoView;
import org.springframework.data.domain.Page;

import java.util.List;

/**
 * @author caiwanlin
 * @create 2018-01-12 10:24
 */
public interface CompanyInfoService extends BaseAuditService<CompanyInfo, Long> {
    Page<CompanyInfoSearchResponse> list(PageSearcher<CompanyInfoSearchRequest> pageSearcher);

    void saveCompanyInfo(CompanyInfoView companyInfoView, List<QualificationInfo> qualificationInfoList, List<ProductLinkInfo> productLinkInfoList);
    CompanyInfo findCompanyInfoByCompanyNameAndProductName(String companyName, String productName);
    CompanyInfo findCompanyInfoByCompanyName(String companyName);

    List<CompanyInfo> findCompaniesByAuditStatus(Integer auditStatus);

    /**
     * 修改公司审核状态
     * @param companyId
     */
    void changeAuditStatus(String companyId,Integer auditStatus);

    /**
     * 查找所有公司的名称
     * @return
     */
    List<CompanyInfo> findAllCompanyName();
}
